﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class communication3 : MonoBehaviour
{

    public GameObject dialogBox1;
    public GameObject dialogBox2;
    public Text dialogBoxText1;
    public Text dialogBoxText2;
    public GameObject eventSystem3;
    public string[] signText = new string[] { "哦，客人想吃凉皮呀，快去做给他吧。请点击左侧按钮进入厨房制作美食。" };
    private bool toNextText;
    private string currentText;
    private int currentNum = 0;
    private int length;
    public bool isfirst = true;
    private bool judgeArrow = true;
    private int clickNum=0;



    private void Awake()
    {
        length = signText.Length;
        currentText = signText[currentNum];
    }


    // Start is called before the first frame update
    void Start()
    {
        dialogBox1.SetActive(false);

        if (isfirst)
        {
            dialogBoxText1.text = currentText;
        }
        isfirst = false;

    }

    // Update is called once per frame
    void Update()
    {


        // dialogBoxText.text = currentText;

        if (Input.GetMouseButtonDown(0))   //0代表鼠标左键 1是右键
        {
            clickNum++;
            if (clickNum == 3)
            {
                dialogBox1.SetActive(true);
             
            }
            if(clickNum==4)
            {
                dialogBox1.SetActive(false);
                eventSystem3.SetActive(false);
            }
        }
    }





}
